﻿	      <?php include("conn.php");
             mysql_query('SET NAMES UTF8'); 

	  

class MyPrizeBean
{
	
	public $zj;
	
	function __construct($zj)
	{
		
		$this->zj      = $zj;
	
	}
}




 
  $prize = array();	$rert33=mysql_query("select *from car where ordersid ='".$sta."'");
	
	$rowf23=mysql_fetch_array($rert33);
	
	$rert37=mysql_query("select *from goodsorders where ordersid ='".$sta."'");
	
	$rowf7=mysql_fetch_array($rert37);
	
	  $rert38=mysql_query("select *from mycoupon where goodsid='".$rowf23[goodsid]."' and userid='".$_GET[userid]."'");//优惠券

 $rowf8=mysql_fetch_array($rert38);
 
 $zongjia=$rowf7[totalprice]-$rowf8[price];
	
	 $srat=mysql_query("update goodsorders set totalprice='".$zongjia."' where ordersid ='".$sta."'");
   
		$prize[] = new MyPrizeBean($zongjia);
		


echo json_encode($prize);


?>